<?php
/*
 * 本地服务
 */
namespace app\home\controller;

use app\common\controller\IndexBase;
use think\facade\Session;
use think\facade\Db;

class Service extends IndexBase
{
    protected function initialize()
    {
        parent::initialize();
    }

    //生活缴费
    public function life()
    {
        $uid = $this->hashids->decode(UserId());
        !$uid && $this->redirect(url('@user')); // 登录直接跳转
        return $this->fetch('',['info'=>Db::table('user')->find($uid)]);
    }
    //城市服务
    public function city()
    {
        $uid = $this->hashids->decode(UserId());
        !$uid && $this->redirect(url('@user')); // 登录直接跳转
        return $this->fetch('');
    }
    //医疗健康
    public function healthy()
    {
        $uid = $this->hashids->decode(UserId());
        !$uid && $this->redirect(url('@user')); // 登录直接跳转
        return $this->fetch('',['info'=>Db::table('user')->find($uid)]);
    }
    //火车票机票
    public function traffic()
    {
        $uid = $this->hashids->decode(UserId());
        !$uid && $this->redirect(url('@user')); // 登录直接跳转
        return $this->fetch('',['info'=>Db::table('user')->find($uid)]);
    }
    //滴滴出行
    public function taxi()
    {
        $uid = $this->hashids->decode(UserId());
        !$uid && $this->redirect(url('@user')); // 登录直接跳转
        return $this->fetch('',['info'=>Db::table('user')->find($uid)]);
    }
    //吃喝玩乐
    public function o2o()
    {
        $uid = $this->hashids->decode(UserId());
        !$uid && $this->redirect(url('@user')); // 登录直接跳转
        return $this->fetch('',['info'=>Db::table('user')->find($uid)]);
    }
    //酒店
    public function hotel()
    {
        $uid = $this->hashids->decode(UserId());
        !$uid && $this->redirect(url('@user')); // 登录直接跳转
        return $this->fetch('',['info'=>Db::table('user')->find($uid)]);
    }




}